YAHOO.util.Event.channels = {}; 
YAHOO.util.Event.subscribe = function (channelName, obj, listenMethod) {
  var getSubscriberMethod = function () {
    return function (type, args, scopeObj) {
      scopeObj[listenMethod].apply(scopeObj, args);
    }   
  }
  if (!this.channels[channelName]) {
    this.createChannel(channelName);
  }
  // Create a subscription for the passed object
  this.channels[channelName].subscribe(getSubscriberMethod(), obj);
};

YAHOO.util.Event.publish = function (channelName, paramObj) {
  if (!this.channels[channelName]) {
    this.createChannel(channelName);
  }
  this.channels[channelName].fire(paramObj);
};

YAHOO.util.Event.createChannel = function (channelName) {
  this.channels[channelName] =
    new YAHOO.util.CustomEvent(channelName, this);
};